#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import userinfo_blueprint
from api_1_0.userInfoResource.userInfoResource import UserInfoResource
from api_1_0.userInfoResource.userInfoOtherResource import UserInfoOtherResource

api = Api(userinfo_blueprint)

api.add_resource(UserInfoResource, '/userInfo/<userID>', '/userInfo', endpoint='userInfo')


# 暴露注册路由
@userinfo_blueprint.route('/userInfo/register', methods=['POST'], endpoint="Register")
def register():
    # print('进入register')
    return UserInfoOtherResource.register()

@userinfo_blueprint.route('/userInfo/login', methods=['POST'], endpoint="Login")
def register():
    # print('进入login')
    return UserInfoOtherResource.login()

